package com.example.hblog.module.service.serviceImpl;

import com.example.hblog.module.dao.AvatarDao;
import com.example.hblog.module.service.AvatarService;
import com.example.hblog.module.pojo.Avatar;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class AvatarServiceImpl implements AvatarService {

    @Autowired
    private AvatarDao avatarDao;


    @Override
    public void uploadAvatar(Avatar avatar) {
        try{
            avatarDao.uploadAvatar(avatar);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    @Override
    public Avatar showAvatar() {
        return avatarDao.showAvatar();
    }

    @Override
    public void clearAvatar() {
        try{
            avatarDao.clearAvatar();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }


//    @Override
//    public void clearRemember() {
//        rememberDao.clearRemember();
//    }
}
